package com.gss.armory.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.gss.common.util.ApplicationMaps;
import com.gss.common.util.ApplicationUtilities;


@Entity
@Table(name="DOCUMENT_AUTH_SIGN_DETAILS")
public class DocumentAuthSignatoryDTO implements Serializable {

	private long docId;
	private String userId;
	private String userName;
	@Id
	@Column(name="DASD_DOC_ID")
	public long getDocId() {
		return docId;
	}
	@Id
	@Column(name="DASD_USER_ID")
	public String getUserId() {
		return userId;
	}
	public void setDocId(long docId) {
		this.docId = docId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
		if(ApplicationUtilities.checkIfNullOrBlank(userName))
			setUserName(ApplicationMaps.USERID_USERNAME_MAP.get(this.userId));
	}
	@Transient
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	
}
